package org.flashIso.engine.library.objects
{
	import flash.utils.ByteArray;

	public class LBinaryData extends LBase
	{
		private var _data:ByteArray = null;
		
		
		override public function validateNow() : void {
			super.validateNow();
		}
		
		public function get data() : ByteArray {
			return _data;
		}
		public function set data(value : ByteArray) : void {
			_data = new ByteArray();
			data.writeBytes(value);
			triggerValidation();
		}
		
		override public function toXML() : XML {
			var xml:XML = super.toXML();
			if (data != null) {
				xml.@length = data.length;
			}else {
				xml.@length = 0;
			}
			return xml;
		}
	}
}